<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			#demo{
				width: 100%;
				height: 400px;
				background-color: orange;
			}
		</style>
	</head>
	<body>
		<div id="demo"></div>

		<script type="text/javascript" >
			const demo = document.getElementById('demo')
			demo.onclick = ()=>{
				console.log('你用鼠标点我了')
			}
			demo.onmouseenter = ()=>{
				console.log('鼠标进入了')
			}

			demo.ontouchstart = ()=>{
				console.log('手指触摸到了橙色盒子')
			}
			demo.ontouchend = ()=>{
				console.log('手指从橙色盒子上抬起来了')
			}
			demo.ontouchmove = ()=>{
				console.log('手指在橙色盒子移动了')
			}
			demo.ontouchcancel = ()=>{
				console.log('触摸被打断了')
			}

			setTimeout(()=>{
				alert(1)
			},3000)
		</script>
	</body>
</html>